/*
 * Beschreibung des Beispiels:  Klassensystem - Shape - Box - Drawing
*/


#include "stdafx.h"
#include "Box.h"
#include "Drawing.h"
#include <stdio.h>

int main(int argc, char* argv[])
    {
    Box b(1, 1, 4, 5);
    cout << "Box" << endl << b << endl;
    Box b1(4, 4, 6, 6);
    Box b2(10, 1, 4, 4);

    Drawing d1;
    d1.add(b);
    d1.add(b1);
    d1.add(b2);
    cout << "Drawing 1 " << endl << d1 << endl;

    Drawing d2(10,10);
    Box b3(5, 5, 3, 3);
    Box b4(0,0, 3, 3);
    d2.add(b3);
    d2.add(b4);
    cout << "Drawing 2 " << endl << d2 << endl;

    d1.add(d2);
    cout << "Containment " << endl << d1 << endl;
    
//Test: Zuweisungsoperator der Klasse Box
    Drawing d3;
    Box b5;
    b5 = b1;
    d3.add(b5);
    cout << "Drawing 3 " << endl << d3 << endl;

//Test: CopyConstructor der Klasse Box
    Drawing d4;
    Box b6 = b4;
    d4.add(b6);
    cout << "Drawing 4 " << endl << d4 << endl;

    getch();
    return 0;
    }
